package com.hc.conferencecheck.mapper;

import com.hc.conferencecheck.entity.AttendRecord;
import com.hc.conferencecheck.entity.AttendRecordExample;

import java.util.List;
import java.util.Map;

import com.hc.conferencecheck.entity.entityDTO.AttendRecordDTO;
import com.hc.conferencecheck.entity.entityDTO.AttendRecordDTOForExport;
import com.hc.conferencecheck.entity.entityDTO.ConferenceDetailDTO;
import com.hc.conferencecheck.entity.entityDTO.ConventionerAttendRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AttendRecordMapper {
    long countByExample(AttendRecordExample example);

    int deleteByExample(AttendRecordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(AttendRecord record);

    int insertSelective(AttendRecord record);

    List<AttendRecord> selectByExample(AttendRecordExample example);

    AttendRecord selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") AttendRecord record, @Param("example") AttendRecordExample example);

    int updateByExample(@Param("record") AttendRecord record, @Param("example") AttendRecordExample example);

    int updateByPrimaryKeySelective(AttendRecord record);

    int updateByPrimaryKey(AttendRecord record);

    /**
     * 查询用户所有申请记录
     *
     * @param params
     * @return
     */
    List<ConventionerAttendRecord> selectConventionerAttendRecord(Map<String, Object> params);

    /**
     * 我的申请模块查询会议详情
     *
     * @param params
     * @return
     */
    List<ConferenceDetailDTO> selectAttendRecordByIds(Map<String, Object> params);

    /**
     * 审核页面查询所有未通过的申请记录
     *
     * @return
     */
    List<AttendRecordDTO> selectAllAttendRecordUnApproved();

    /**
     * 用于会议审核页面会议申请记录导出的查询方法
     *
     * @param params
     * @return
     */
    List<AttendRecordDTOForExport> selectAttendRecordInfoByConferenceId(Map<String, Object> params);
}